<template>
  <div class="HeaderBar.vue">
    <div class="header">
      <!-- <img :src="'@/assets/imgs/icons/search.png'" alt="" class="head-search"> -->
      <img @click="$router.back(-1)" :src="srcSearch" alt class="head-icon head-search">
      <h2 class="head-zaowu">{{title}}</h2>
      <div class="head-icons">
        <img :src="srcChat" alt class="head-icon head-chat">
        <router-link class="head-icon head-cart" tag="img" :src="require('@/assets/imgs/icons/cart.png')"  to="/cart/:goodsMsg"></router-link>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'HeaderBar.vue',
  props: ["srcSearch","title","srcChat"],

  data () {
    return {
      src: "require('@/assets/imgs/icons/search.png')"
    }
  },

  methods: {}
}
</script>

<style lang='scss' scoped>
@import "@/assets/style/commin.scss";

.header {
    display: flex;
    padding: 0 $basPadding;
    justify-content: space-between;
    align-items: center;
    // background-color: pink;
    margin-bottom: 13.5px;
    width: 100%;
    height: 28px;
    .head-zaowu {
      font-size: 20px;
      color: #000;
      padding-left: 20px;
    }
    .head-icons {
      .head-chat {
        // padding-right: 20px;
        // margin-right: 20px;
        margin-right: 20px;
      }
    }
    .head-icon {
      width: 20px;
      height: 20px;
    }
    .head-search {
    }
  }
</style>
